package cc.atliberty.creating.abstractfactory.abstractfactory2;

public class Client {
    public static void main(String[] args) {
        String[] shapes = {"angle", "CIRCLE", "rectangle"};
        String[] colors = {"red", "green", "blue"};
        String[] facs = {"shapeFactory", "colorFactory"};
        for (String fac : facs) {
            AbstractFactory factory = ProduceFactory.getFactory(fac);
            for (String shape : shapes) {
                if (factory.getShape(shape) != null) {
                    factory.getShape(shape).draw();
                }
            }
            for (String color : colors) {
                if (factory.getColor(color) != null) {
                    factory.getColor(color).fill();
                }
            }
        }
    }
}
